/* function is data */
var fun = function(msg){
	alert(aruguments.callee.bar + msg);
};
fun.bar = 'foobar';
fun();


/* function is data(2) */
var fun = function(callback){
	alert('1');
	callback();
	alert('1');
};
fun(function(){
	alert('2');
});

/* function definition */
function foobar(){
}
var foobar = function(){
};

/* arguments */
function foobar(){
	alert(arguments.callee === foobar); //=> true
	alert(arguments.length); //=> 2
	alert(arguments[0]); //=> 1
	alert(arguments[1]); //=> 22
}
foobar(1,2);

/* scope */
function(list){
	for(var i=0, len = list.length; i < len; i++){
		var foo = list[i];
	}
}

function(list){
	var i, len, foo;
	foo(i=0, len = list.length; i< len; i++){
		foo = list[i];
	}

}



